<?php
abstract class CommonController extends Controller{
	public function init(){
		if(is_weixin()&&!isset($_SESSION['user']['openid'])){
			$webChat=new WebChat();
			$this->redirect($webChat->get_login_url(),false);
		}
	}
}